<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->

    <style type="text/css">
        body {
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #eee;
        }

        .form-signin {
            max-width: 330px;
            padding: 15px;
            margin: 0 auto;
        }
        .form-signin .form-signin-heading,
        .form-signin .checkbox {
            margin-bottom: 10px;
        }
        .form-signin .checkbox {
            font-weight: normal;
        }
        .form-signin .form-control {
            position: relative;
            height: auto;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            padding: 10px;
            font-size: 16px;
        }
        .form-signin .form-control:focus {
            z-index: 2;
        }
        .form-signin input[type="account"] {
            margin-bottom: -1px;
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="form-signin">
        <h2 class="form-signin-heading">登录</h2>
        <input type="account" id="account" class="form-control" placeholder="Account" required autofocus>
        <input type="password" id="password" class="form-control" placeholder="Password" required>
        <input type="input" id="code" class="form-control" placeholder="验证码" required><span>点击刷新验证码，注意大小写</span>
        <img class="verify-code" >
        <button class="btn btn-lg btn-primary btn-block" id="btn-sub">登录</button>
    </div>
</div> <!-- /container -->



<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script src="js/CryptoJS/rollups/md5.js"></script>
<script src="js/common.js"></script>
<script language="JavaScript">
    $(function(){
        $(".verify-code").attr("src",api_cfg.verify);
    });
    $(".verify-code").click(function(){$(this).attr("src",urlAppend(api_cfg.verify,Math.random()))});
    $("#btn-sub").click(function(){
        if($("#account").val() == "" || $("#password").val() == ""||$("#code").val()==""){
            $(".verify-code").attr("src",urlAppend(api_cfg.verify,Math.random()));
            return msgErr("信息不完整！");
        }
        api.login({
            "account":$("#account").val(),
            "pwd":CryptoJS.MD5($("#password").val()).toString(),
            "code":$("#code").val()
        });
    });
</script>
</body>
</html>